import { createSlice } from "@reduxjs/toolkit";

const initialState = {
  email: "",
};

const resetPasswordStore = createSlice({
  name: "resetPasswordStore",
  initialState: initialState,
  reducers: {
    inputEmail(state, { payload }) {
      state.email = payload;
    },
  },
});

function sendCodeByEmail(email) {
  console.log("sendCodeByEmail{}", email);

  return;
}

function verifyCode(code) {
  console.log("verifyCode{}", code);
  return;
}

function resetPassword(email, password) {
  console.log("resetPassword{},{}, email, password);
  return;
}

export { sendCodeByEmail, verifyCode, resetPassword };

export default resetPasswordStore.reducer;

export const { inputEmail } = resetPasswordStore.actions;
